<%= simple_form_for(@purchase_order) do |f| %>
<%= f.error_notification %>
<%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %>

<div class="row">
	<div class="col-md-6">
		<%= f.input :po_number, label: "合同号" %>
	</div>
	<div class="col-md-6">
		<div class="form-group date optional form-group-valid">
			<label class="form-control-label date optional" for="purchase_order_date">合同日期</label>
			<div class="input-group">
				<input name="purchase_order[date]" class="form-control date-picker" id="purchase_order_date" type="text" data-date-format="yyyy-mm-dd" placeholder="yyyy-mm-dd">
				<span class="input-group-addon"> <i class="fa fa-calendar"></i> </span>
			</div>
		</div>
	</div>
</div>

<div class="row">
	<div class="col-md-6">
		<%= f.input :supplier_id, collection: Supplier.all, label:"供应商" %>
	</div>
	<div class="col-md-6">
		<%= f.input :amount,label: "合同金额" %>
	</div>

</div>

<div class="row">
	<div class="col-md-6">
		<%= f.input :payment_term ,label: "结算方式" %>
	</div>
	<div class="col-md-6">
		<div class="form-group date optional form-group-valid">
			<label class="form-control-label date optional" for="purchase_order_dueday">应付款日期</label>
			<div class="input-group">
				<input name="purchase_order[dueday]" class="form-control date-picker" id="purchase_order_dueday" type="text" data-date-format="yyyy-mm-dd" placeholder="yyyy-mm-dd">
				<span class="input-group-addon"> <i class="fa fa-calendar"></i> </span>
			</div>
		</div>
	</div>

</div>
<%= f.button :submit, '提交',class: "btn btn-blue btn-xs" %>

<% end %>
